<form ng-submit="search(false)">
    <table cellpadding="0" cellspacing="0" style="white-space: nowrap;" stop-event='click'>
        <tr>
            <td class="quick_search uib-dropdown" uib-dropdown is-open="advancedMenu.isOpen">
                <i class="fa fa-fw fa-search search-indicator" ng-hide="canReset()"></i>

                <i class="fa fa-times-circle opacity_hover search-indicator" ng-click="reset()" title="Reset Search"
                   ng-show="canReset()"></i>

                <input type="search" class="quick_search_input" ng-model="queryText" placeholder="Search">

                <i class="fa fa-caret-down opacity_hover" ng-click="toggleAdvancedMenuDropdown($event)"
                   style="padding: 9px 5px 4px 5px; color: #999; height: 33px; background-color: #ededed;"></i>

                <!--<i class="fa fa-search cursor_pointer blue"-->
                <!--style="padding: 4px 9px 4px 5px; background-color: #fff; font-size: 19px"></i>-->

                <div class="uib-dropdown-menu" style="padding: 12px;width: 451px">
                    <span style="letter-spacing:-1px; color:#555;">&nbsp;<b>TYPE</b>&nbsp;&nbsp;</span>
                    <label class="checkbox-inline" stop-event='click'>
                        <input type="checkbox" ng-model="searchTypes.all" ng-change="check('all')">All
                    </label>

                    <label class="checkbox-inline" stop-event='click'>
                        <input type="checkbox" ng-model="searchTypes.strain" ng-change="check('strain')">Strain
                    </label>

                    <label class="checkbox-inline" stop-event='click'>
                        <input type="checkbox" ng-model="searchTypes.plasmid" ng-change="check('plasmid')">Plasmid
                    </label>

                    <label class="checkbox-inline" stop-event='click'>
                        <input type="checkbox" ng-model="searchTypes.part" ng-change="check('part')">Part
                    </label>

                    <label class="checkbox-inline" stop-event='click'>
                        <input type="checkbox" ng-model="searchTypes.arabidopsis" ng-change="check('arabidopsis')">Arabidopsis
                    </label>

                    <div class="divider"></div>

                    <span style="letter-spacing:-1px; color:#555;"><b>BLAST</b></span>

                    <select class="pull_down" ng-model="blastSearchType">
                        <option value="">Choose one</option>
                        <option value="BLAST_N">Nucleotide Search (blastn)</option>
                        <option value="TBLAST_X">Nucleotide Translated Search (tblastx)</option>
                    </select>

                    <br>
                    <textarea class="margin-top-5" rows="6" placeholder="Enter Sequence" style="width: 100%"
                              class="input-sm" ng-model="sequenceText"></textarea>

                    <div class="divider"></div>

                    <label class="checkbox-inline" stop-event='click'>
                        <input type="checkbox" ng-model="hasAttachment">Has Attachment
                    </label>

                    <label class="checkbox-inline" stop-event='click'>
                        <input type="checkbox" ng-model="hasSample">Has Sample
                    </label>

                    <label class="checkbox-inline" stop-event='click'>
                        <input type="checkbox" ng-model="hasSequence">Has Sequence
                    </label>

                    <div class="divider"></div>

                    <span style="letter-spacing:-1px; color:#555;"><b>BIO SAFETY LEVEL</b></span>

                    <select class="pull_down" ng-model="bioSafetyLevelOption">
                        <option value="">Choose one</option>
                        <option value="1">Level 1</option>
                        <option value="2">Level 2</option>
                    </select>

                    <div class="divider"></div>
                    <strong style="letter-spacing:-1px; color:#555;">FIELD FILTERS</strong>

                    <div ng-if="!fieldFilters.length">
                        <small class="text-muted opacity_hover" ng-click="addFieldFilter()">
                            Add filter <i class="fa fa-plus-circle"></i>
                        </small>
                    </div>

                    <div ng-repeat="filterFilter in fieldFilters">
                        <select class="pull_down" ng-model="fieldFilters[$index].field">
                            <option value="">Select Filter</option>
                            <option value="NAME">Name</option>
                            <option value="ALIAS">Alias</option>
                            <option value="PART_NUMBER">Part Number</option>
                        </select>

                        <input class="input_box" style="width: 200px" ng-model="fieldFilters[$index].filter"/>
                        <i class="fa fa-fw fa-plus opacity_hover" ng-click="addFieldFilter()"></i>
                        <i class="fa fa-fw fa-minus opacity_hover" ng-click="removeFieldFilter($index)"></i>
                    </div>

                    <div class="divider"></div>

                    <div>
                        <button class="btn btn-link" type="button" ng-click="search(true)">
                            <i style="color: #555" class="fa fa-globe"></i> <span
                                class="font-90em">Search other registries</span>
                        </button>

                        <span class="pull-right">
                            <button type="submit" class="btn btn-sm btn-primary">Search</button>
                            <button type="button" class="btn btn-sm btn-default" ng-click="reset()" stop-event='click'>
                                Reset
                            </button>
                        </span>
                    </div>

                </div>
            </td>
            <td> &nbsp;
                <button style="width: 80px; padding: 7px" type="submit" class="btn btn-primary btn-sm">
                    <b>SEARCH</b>
                </button>
            </td>
        </tr>
    </table>
</form>
